import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    userInfo: {
    },
    menu: [],
    projectList: [],
    currentTask: {
      status: '',
      id: ''
    },
    taskInfo: {
      status: '',
      id: ''
    },
    comments: [],
    files: [],
    userList: [],
    exitInfo: {}
  },
  mutations: {
    setUserInfo (state, userInfo) {
      state.userInfo = userInfo;
    },
    setExitInfo (state, exitInfo) {
      state.exitInfo = exitInfo;
    },
    setUserList (state, userList) {
      state.userList = userList;
    },
    setMenu (state, menu) {
      state.menu = menu;
    },
    setProjectList (state, projectList) {
      state.projectList = projectList;
    },
    setCurrentTask (state, currentTask) {
      state.currentTask = currentTask;
    },
    setTaskInfo (state, taskInfo) {
      state.taskInfo = taskInfo;
    },
    setComments (state, comments) {
      state.comments = comments;
    },
    setFiles (state, files) {
      state.files = files;
    }
  },
  actions: {

  }
});
